﻿@using WanFang.Users.Dto
@model  List<UserDto>
@{
    Layout = "~/Views/Shared/_TestLayout.cshtml";
}
@section headSec{
<link href="/Content/Hplus-v.4.1.0/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/Content/treeview/css/bootstrap-treeview.css" rel="stylesheet">
    <script src="/Content/treeview/bootstrap-treeview.js"></script>
    <script src="/Content/BootstrapMenu/BootstrapMenu.min.js"></script>
<script src="/Content/Hplus-v.4.1.0/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>

    <script>
        $(document).ready(function(){
            $("#personTb").bootstrapTable({
                search: true,
                pagination: true,
                showRefresh: true,
                showToggle: true,
                showColumns: true,
        checkbox: true,
        clickToSelct: true,
                iconSize: 'outline',
                toolbar: '#exampleTableEventsToolbar',
                onLoadSuccess: function (data) {
                    alert('load');
                    console.log(data);
                    //$('#personTb').bootstrapTable('load', data.result);
                },
                onLoadError: function (status) {
                    alert("error");
                    console.log(status);
                },
                icons: {
                    refresh: 'glyphicon-repeat',
                    toggle: 'glyphicon-list-alt',
                    columns: 'glyphicon-list'
                }
            });
        });

        function DialogResult(){
           var res = $("#personTb").bootstrapTable('getSelections');
        return res;
        console.log(res);
        }
    </script>
}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5 id="pHead">成员：</h5>
                    <div class="ibox-tools">
                        @*<a class="collapse-link" onclick="showAddPersonDlg()">
                            <i class="fa fa-plus"></i>添加成员
                        </a>*@
                    </div>
                </div>
                <div class="ibox-content">
                    <table id="personTb" data-height="250" data-mobile-responsive="true">
                        <thead>
                            <tr>
                                <th data-checkbox="true"></th>
                                <th data-field="Id">ID</th>
                                <th data-field="FullName">姓名</th>
                                <th data-field="EmailAddress">email</th>
                            </tr>
                        </thead>
                        <tbody>
                            @{ foreach (UserDto entity in Model)
                                {
                            <tr>
                                <td></td>
                                <td data-field="Id">@entity.Id</td>
                                <td data-field="FullName">@entity.FullName</td>
                                <td data-field="EmailAddress">@entity.EmailAddress</td>
                            </tr>
                                    }
                                }
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
